Welcome to Turbo Pascal OOP Tutor, which allows notes on Object-oriented Programming to be viewed in a scrollable window, whilst the source code for a number of examples can also be inspected. These example programs can be run as executable files (.EXE) from the tutor screen. The
menu is accessed by pressing Alt-Space. All the other menus are accessed by pressing Alt-Z, where Z is the first letter of the menu. For example, the "Notes" menu is pulled down by Alt-N. The Status Line provides appropriate prompts and shows, bottom right, the available Heap space. Use the arrow keys to scroll the text. )
Press ESC to put this help screen away.
Help File
This help file is created by typing the information using any word processor and conveniently in the IDE of Turbo Pascal itself. The extended ASCII characters such as
and
are entered by holding down the Alt key and entering the ASCII values such as 223 and 220 using the Numeric Keypad to the right of the keyboard, releasing the Alt key after each numeric entry.
File viewer
A file viewer views the contents of a text file. You can use the arrow keys to move about in the file. A file is loaded via the File
Open menu item. a
Up Move up one line
Down Move down one line
Right Move right one column
Left Move left one column
PgUp Move one page up
PgDn Move one page down
Home View right most column of the file
End View left most column of the file
Ctrl-PgUp View top of file
Ctrl-PgDn View bottom of file.
File viewers can be resized and moved using the Windows menu.
List
Selecting List from the Notes sub-menu provides a screen window containing an alphabetical list of text files covering many Turbo Pascal OOP topics, with a brief description of the contents. After observing the filename required, press Alt-F3 to leave this screen display and then select Open to obtain a Dialog Box for selection of the reqired file.
List Open
Select the required file from the Dialog Box by pressing the Tab key and then using the arrow keys to move to the appropriate file. Then press the ENTER key.
Example Code
On selecting Open a list of Pascal source code files is presented for selection of the required file by pressing the Tab key and using the arrow keys to move to the appropriate file. The ENTER key should then be pressed.
RecInit
This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key R. p
Program to illustrate the initialization of a record by conventional means as opposed to the use of 'objects'.
(System) menu
(Alt-Spacebar)
The System menu appears on the far left of the menu bar and is represented by the
symbol. (
When you pull down the
menu, you see
About
About
When you choose the About command from the
(System) menu, a dialog box appears, showing copyright and version information. >
To close the box, press Esc, or click the top left symbol
ObjInit
This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key O. r
Program to illustrate the initialization of a record by the use of an object as opposed to conventional methods.
WrongOOP
This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key W. T
Program to illustrate the need for Virtual Methods in object-oriented programming.
Examples Open
To open a source code file select Open by arrow keys and then press ENTER, or just press O. Then use the tab key to move to the list of programs and then the arrow keys to select the required one. Then press ENTER.
RightOOP
This program can be run by selection using the arrow keys and pressing ENTER, or else by pressing the highlighted key i. J
This is an example of object-oriented programming using virtual methods.
Notes (Alt-N)
The Notes menu offers choices for opening files, changing directories, and exiting the program. $
Open Change
Dir FExit
File
Open (F3)
The Open command displays the Open a File dialog box. In this dialog box you select the text file you want to browse in a file
viewer. &
The Open
File dialog box contains:
an input
box with a history list
a list
box to browse the directory
the standard Cancel button
Open action button
an information panel that describes the
selected file
File
Change Dir...
Change Dir brings up the Change
Directory dialog box, in which you can change the current directory.
File
DOS Shell
With the DOS Shell command, you can leave the program temporarily to perform a DOS command or run another program. 9
To return to this program, type EXIT at the DOS prompt.
File
Exit
(Alt-X)
The Exit command terminates this program.
Window
(Alt-W)
The Window menu contains commands to close, move and perform other window-management commands.
Most of the windows in this program have all the standard window elements, including scroll bars, a close box, and zoom icons. >
For more about windows and their elements, refer to windows. :
Window-management commands
Size/Move Zoom
Tile Cascade
Next Previous
Close
Window
Size/Move
(Ctrl-F5)
Choose this command to change the size or position of the active window.
Size
If you press Shift while you use the arrow keys, you can change the size of the active window. Once you've adjusted its size or position, press Enter. Q
If a window has a Resize corner, you can drag that corner to resize the window.
Move
When you choose Window
Size/Move, the active window moves in response to the arrow keys. Once you've moved the window to where you want it, press Enter. F
You can also move a window by dragging its title bar with the mouse.
Window
Zoom
(F5)
Choose Zoom to resize the active window to the maximum size. If the window is already zoomed, you can choose this command to restore it to its previous size. {
You can also double-click anywhere on the window's title bar (except where an icon appears) to zoom or unzoom the window.
Window
Tile
Choose Window
Tile to tile all file viewers on the desktop. L
Tiled Windows
Window
Cascade
Choose Window
Cascade to stack all file viewers on the desktop. A
Cascaded Windows
Window
Next
Choose Next to cycle forwards through the windows on the desktop.
Window
Previous
Choose Previous to cycle backwards through the windows on the desktop.
Window
Close
(Alt-F3)
Choose Close to close the active window. O
You can also click the Close box in the upper right corner to close a window.
Options (Alt-O)
The Options menu contains commands that let you change color and mouse default settings.
Options
Mouse...
The Mouse command brings up the Mouse
Options dialog box, where you can set various options that control how your mouse works, including: R
how fast a double-click is
which mouse button (right or left) is
active
Options
Colors...
The Colors item brings up the Colors
dialog box, where you can customize the colors of the display.
Options
Save Desktop
Saves the state of all open windows to a file call OOPTUTOR.DSK. This file can be reloaded by selecting Options
Restore
Desktop.
Options
Restore Desktop
Restore a previously-saved state of all open windows from a file call OOPTUTOR.DSK. This file is saved via the Options
Desktop menu command.
Help on Open a File Dialog Box
The Open a File dialog box contains an input box, a file
list, a file information panel, the standard button Cancel, one other action button (Open), plus a history list that's attached to the Name
inputbox.
Name
The Name input box is where you enter the name of the file to lo